package com.neutech.running;


import com.neutech.base.Sprite;
import com.neutech.util.ImageUtil;

import java.awt.Graphics;
import java.awt.Image;

public class BackGround extends Sprite {
    //扩展自己的属性
    private Image image;
    public BackGround(){
        init();
    }
    public void init(){
        //设置起始位置
        setX(0);
        setY(0);
        image= ImageUtil.get("background");
    }
    @Override
    public void draw(Graphics g) {
        g.drawImage(image,getX(),getY(),null);
    }
}

